<template>
    <view style="position: fixed;display:flex;bottom: 0rpx;width: 100%;text-align: center;background-color: white;font-size: 24rpx;">
        <view @click="handleTodoList"><view><img v-if="selection=='sign'" src="/static/images/tabbar/sign.png" style="width: 50%"/>
            <img v-if="selection!='sign'" src="/static/images/tabbar/sign_.png" style="width: 50%"/>
        </view><view>待办</view></view>
        <view @click="handleAIList"><view><img v-if="selection=='sum'" src="/static/images/tabbar/sum.png" style="width: 50%"/>
            <img v-if="selection!='sum'" src="/static/images/tabbar/sum_.png" style="width: 50%"/>
        </view><view>会话总结</view></view>
        <view @click="todo"><view><img v-if="selection=='meeting'" src="/static/images/tabbar/meeting.png" style="width: 50%"/>
            <img v-if="selection!='meeting'" src="/static/images/tabbar/meeting_.png" style="width: 50%"/></view><view>会议纪要</view></view>
        <view @click="todo"><view><img v-if="selection=='me'" src="/static/images/tabbar/me.png" style="width: 50%"/>
            <img v-if="selection!='me'" src="/static/images/tabbar/me_.png" style="width: 50%"/>
        </view><view>个人中心</view></view>
    </view>
</template>

<script>

	export default {
		name: 'tabBar',
		props: {
			selection: {
				type: String,
				default: 'sign'
			},
            taskOwner: {
                type: String,
                default: ''
            },
		},
        data() {
            return {
                groupId: '',
            }
        },
        methods: {
            onClick() {
                this.$emit('click')
            },
            handleTodoList(e) {
                this.$tab.navigateTo(`/pages/aitodo/list?taskOwner=${this.taskOwner}&isFin=0&current=1&id=123`)
            },
            handleAIList(e) {
                this.$tab.navigateTo(`/pages/ai/list?taskOwner=${this.taskOwner}&groupId=${this.groupId}&id=123`)
            },
            todo(){
                this.$modal.msgSuccess("即将上线...")
            },
        },
        created()
        {
            this.groupId = uni.getStorageSync("ai_groupId")
        }

	}

</script>
<style lang="scss" >
	$uni-primary: #2979ff !default;

	.uni-section {
		background-color: #fff;
    .uni-section-header {
      position: relative;
      /* #ifndef APP-NVUE */
      display: flex;
      /* #endif */
      flex-direction: row;
      align-items: center;
      padding: 12px 10px;
      font-weight: normal;

      &__decoration{
        margin-right: 6px;
        background-color: $uni-primary;
        &.line {
          width: 4px;
          height: 12px;
          border-radius: 10px;
        }

        &.circle {
          width: 8px;
          height: 8px;
          border-top-right-radius: 50px;
          border-top-left-radius: 50px;
          border-bottom-left-radius: 50px;
          border-bottom-right-radius: 50px;
        }

        &.square {
          width: 8px;
          height: 8px;
        }
      }

      &__content {
        /* #ifndef APP-NVUE */
        display: flex;
        /* #endif */
        flex-direction: column;
        flex: 1;
        color: #333;

        .distraction {
          flex-direction: row;
          align-items: center;
        }
        &-sub {
          margin-top: 2px;
        }
      }

      &__slot-right{
        font-size: 14px;
      }
    }

    .uni-section-content{
      font-size: 14px;
    }
	}
</style>
